package com.yanfan.base.codec;


import com.yanfan.base.session.Session;
import com.yanfan.common.core.mq.DeviceReport;
import io.netty.buffer.ByteBuf;

/**
 * 基础消息解码类
 *
 * @author bill
 */
public interface MessageDecoder {

    /**
     * TCP3.进站消息解码方法
     */
    DeviceReport decode(ByteBuf buf, String clientId);

    default DeviceReport decode(ByteBuf buf, String clientId, Session session) {
        return decode(buf, clientId);
    }

}
